import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Index from '@/views/Index'
import Log from '@/views/Log'
import Reg from '@/views/Reg'
import Home from '@/views/Home'
import Cart from '@/views/Cart'
import Classes from '@/views/Classes'
import My from '@/views/My'
import Pub from '@/views/Pub'
import Rlg from '@/views/Rlg'
import Tuijian from '@/views/Tuijian'
import Jianding from '@/views/Jianding'
import Qiugou from '@/views/Qiugou'
import Zuanqu from '@/views/Zuanqu'
import Shop from '@/views/Shop'
import Yanghu from '@/views/Yanghu'
import Img from '@/views/Img'
import Goods from '@/views/Goods'
import Pingjia from '@/views/Pingjia'
import Adres from '../views/Adres'
import Liaotian from '../views/Liaotian'
import Liaotian2 from '../views/Liaotian2'
import Find from '@/views/Find'
import Addadres from '@/views/Addadres'
import Search from '@/views/Search'
import Vuex from 'vuex'
import Sales from '@/views/Sales'
import RecySales from '@/views/RecySales'
import ImgageUP from '@/views/ImgageUP'
import Submit from '@/views/Submit'
import Recycle from '@/views/Recycle'
import FreeRelease from '@/views/FreeRelease'
import Payment from '@/views/Payment'
import Setsss from '@/views/Setsss'
import Coupon from '@/views/Coupon'
import Details from '@/views/Details'
import Dity from '@/views/Dity'
import Setting from '@/views/Setting'
import {
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton
} from 'vant';
Vue
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton);

import { Lazyload } from 'vant'

// options 为可选参数，无则不传
Vue.use(Lazyload);
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/rlg',
    },
    {
      path: '/log',
      name: 'Log',
      component: Log
    },
    {
      path: '/rlg',
      name: 'Rlg',
      component: Rlg
    },
    {
      path: '/reg',
      name: 'Reg',
      component: Reg
    },
    {
      path: '/index',
      redirect: '/home',
      component: Index,
      children: [
        {
          path: '/home',
          component: Home,
        },
      ],
    },
    {
      path: '/my',
      component: My
    },
    {
      path:'/Search',
      component:Search
    },
    {
      path: '/img',
      component: Img
    },
    {
      path: '/goods',
      component: Goods
    },
    {
      path: '/classes',
      component: Classes
    },
    {
      path: '/tuijian',
      component: Tuijian
    },
    {
      path: '/jianding',
      component: Jianding
    },
    {
      path: '/yanghu',
      component: Yanghu
    },
    {
      path: '/qiugou',
      component: Qiugou
    },
    {
      path: '/shop',
      component: Shop
    },
    {
      path: '/zuanqu',
      component: Zuanqu
    },
    
    {
      path: '/pingjia',
      component: Pingjia
    },
    {
      path: '/cart',
      component: Cart
    },
    {
      path: '/pub',
      component: Pub
    },

    {
      path: '/pub',
      component: Pub
    },
    {
      path:'/adres',
      component:Adres
    },
    {
      path:'/liaotian',
      component:Liaotian
    },
    {
      path:'/liaotian2',
      component:Liaotian2
    },
    {
      path:'/find',
      component:Find
    },
    {
      path:'/addadres',
      component:Addadres
    },
    {
      path: '/sales',
      component: Sales,
    },
    {
      path:'/freeRelease',
      component:FreeRelease
    },
    {
      path:'/recycle',
      component:Recycle
    },
    {
      path: '/recysales',
      // component: ()=>import('@iews/Recysales'),
      component:RecySales,
    },
    {
      path: '/imgageup',
      component: ImgageUP,
    },
    {
      path:'/submit',
      // component:()=>('@iews/Finish')
      component:Submit
    },
    {
      path:'/dity',
      component:Dity
    },
    {
      path: '/payment',
      component: Payment
    },
    {
      path: '/setsss',
      component: Setsss
    },
    {
      path: '/Coupon',
      component: Coupon
    },
    {     
      path: '/details/:id',
      component: Details
    },
    {
      path: '/setting',
      component: Setting
    },
  ]
})
